Skip to content

Conversation

@kblaschke
Copy link
Member

Allow apps to set the time before each frame, allowing for non-realtime rendering with fixed or dynamic framerates. Setting the frame time to any value equal to or greater than zero will use this value for the next frame, while setting it to a negative value will make projectM use the system time instead.

The value defaults to -1.0, so if the projectm_set_frame_time() method is not called, projectM will just behave as in previous versions.

Also added another function to retrieve the time of the last rendered frame.

Closes #740

kblaschke added 2 commits June 9, 2024 12:51
Setting a custom frame time will result in stable animation speeds if projectM does not render at real-time speeds, e.g. while encoding a video from an audio file as fast as possible.
@kblaschke kblaschke added the enhancement The feature is considered an enhancement. label Jun 9, 2024
@kblaschke kblaschke added this to the 4.2 milestone Jun 9, 2024
@kblaschke kblaschke self-assigned this Jun 9, 2024
@kblaschke kblaschke merged commit f94f99d into projectM-visualizer:master Jun 21, 2024
@kblaschke kblaschke deleted the add-external-timing-api branch June 21, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement The feature is considered an enhancement.

Projects

Development

Successfully merging this pull request may close these issues.

Add the ability to control the actual running time from the outside.

2 participants